package cn.zyq.baking.service.impl;

import cn.zyq.baking.mapper.CategoryMapper;
import cn.zyq.baking.pojo.vo.CategoryVO;
import cn.zyq.baking.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**个人中心-稿件管理-发布文章模块 ，发布文文章时需要显示一级类别，并根据一级类别查询二级类别*/
@Service
public class CategoryServiceImpl implements ICategoryService {

    @Autowired
    CategoryMapper categoryMapper;
    public List<CategoryVO> typeList() {
        return categoryMapper.getTypeList();
    }

    public List<CategoryVO> subListByType(Long id) {
        return categoryMapper.getSubTypeByTypeId(id);
    }
}
